<!--
 * @Author: your name
 * @Date: 2020-11-14 10:59:03
 * @LastEditTime: 2020-11-16 21:25:50
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \movie\views\admin\login\index.html
-->
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>千锋电影管理后台-登录</title>
    <link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="css/animate.css" rel="stylesheet">
    <link href="css/style.css?v=4.1.0" rel="stylesheet">
    <script>
        if ( window.top !== window.self ) {
            window.top.location = window.location;
        }
    </script>
</head>

<body class="gray-bg">

    <div class="middle-box text-center loginscreen  animated fadeInDown">
        <div>
            <div>

                <h1 class="logo-name">m++</h1>

            </div>
            <h3>欢迎使用 千锋后台管理系统</h3>

            <form class="m-t" role="form" onsubmit="return dopost()" method="POST" action="/admin/login">
                <div class="form-group">
                    <input type="text" name='username' value="admin" class="form-control" placeholder="用户名">
                </div>
                <div class="form-group">
                    <input type="text" name='password' value="123456" class="form-control" placeholder="密码">
                </div>
                <button type="submit" class="btn btn-primary block full-width m-b">登 录</button>


                <p class="text-muted text-center"> <a href="login.html#"><small>忘记密码了？</small></a> | <a
                        href="register.html">注册一个新账号</a>
                </p>

            </form>
        </div>
    </div>

    <!-- 全局js -->
    <!-- <script src="./jquery-3.5.1.min.js"></script> -->
    <script src="js/jquery.min.js?v=2.1.4"></script>
    <script src="js/bootstrap.min.js?v=3.3.6"></script>
    <script>
        //表单前端验证 session
        function dopost(){
          let username=$.trim($('input[name=username]').val())
  
          let password=$.trim($('input[name=password]').val())

          let flag=true;
          if(''==username){
            flag=false;
          }
          if(''==password){
            flag=false;
          }
          if(!flag){
            alert('账号密码不能为空')
          }
          return flag;
        }
    </script>

</body>

</html>
